home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Delphi Programmer's Power Pack
/
Delphi Volume 1.iso
/
s_to_z
/
wmapdemo
/
data.z
/
ADJGRID.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-03-06
|
1KB
|
57 lines
unit Adjgrid;
interface
uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, Buttons,
StdCtrls, ExtCtrls, Sysutils;
type
TGridDlg = class(TForm)
OKBtn: TBitBtn;
CancelBtn: TBitBtn;
HelpBtn: TBitBtn;
Bevel1: TBevel;
Edit1: TEdit;
Label1: TLabel;
Label2: TLabel;
Edit2: TEdit;
procedure OKBtnClick(Sender: TObject);
private
{ Private declarations }
phgap : ^integer;
pvgap : ^integer;
public
{ Public declarations }
constructor Create(AOwner:TComponent; var hgap,vgap : integer);
end;
var
GridDlg: TGridDlg;
implementation
{$R *.DFM}
constructor TGridDlg.Create(AOwner:TComponent; var hgap,vgap : integer);
begin
inherited Create(AOwner);
phgap := Addr(hgap);
pvgap := Addr(vgap);
Edit1.text := inttostr(hgap);
Edit2.text := inttostr(vgap);
end;
procedure TGridDlg.OKBtnClick(Sender: TObject);
begin
try
phgap^ := strtoint(Edit1.text);
pvgap^ := strtoint(Edit2.text);
except
On EConvertError do begin
ActiveControl := edit1;
modalresult := mrNone;
end;
end;
end;
end.